/**
 * 上海中赢金融信息服务有限公司
 * Copyright (c) 2017-2027 Chinazyjr,Inc.All Rights Reserved.
 */

package com.sys.midware.mongo.config;

/**
 * <b>ClassName:</b> BConfigVO.java <br/>
 * <b>Description:</b> 配置文件实体类 <br/>
 * <b>Date:</b> 2015年10月16日 下午3:55:42<br/>
 * 
 * @author mobing
 * @version
 */
public class MongoConfig {
    /**
     * 节点名称，一般为业务库的标识
     */
    private String nodeName;

    /**
     * 节点类型，主从
     */
    private String nodeType;

    /**
     * ip
     */
    private String host;

    /**
     * 端口
     */
    private int port;

    /**
     * 是否需要认证
     */
    private boolean isAuth;

    /**
     * 用户名
     */
    private String userName;

    /**
     * 密码
     */
    private String password;

    /**
     * 认证db
     */
    private String authDB;
    /**
     * 主机连接数
     */
    private int connectionsPerHost;

    /**
     * 允许多线程连接数
     */
    private int threadsAllowedToBlockForConnectionMultiplier;

    /**
     * 连接超时
     */
    private int connectTimeout;

    /**
     * 最大等待时间
     */
    private int maxWaitTime;

    /**
     * 是否自动重连
     */
    private boolean autoConnectRetry;

    /**
     * socket保持存活状态
     */
    private boolean socketKeepAlive;

    /**
     * 会话超时
     */
    private int socketTimeout;

    /**
     * 连接池大小
     */
    private int connectionPoolSize;
    
    

    /**
     * authDB
     *
     * @return  the authDB
     */
    
    public String getAuthDB() {
        return authDB;
    }

    /**
     * @param authDB the authDB to set
     */
    public void setAuthDB(String authDB) {
        this.authDB = authDB;
    }

    public String getNodeName() {
        return nodeName;
    }

    public void setNodeName(String nodeName) {
        this.nodeName = nodeName;
    }

    public String getNodeType() {
        return nodeType;
    }

    public void setNodeType(String nodeType) {
        this.nodeType = nodeType;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getConnectionsPerHost() {
        return connectionsPerHost;
    }

    public void setConnectionsPerHost(int connectionsPerHost) {
        this.connectionsPerHost = connectionsPerHost;
    }

    public int getThreadsAllowedToBlockForConnectionMultiplier() {
        return threadsAllowedToBlockForConnectionMultiplier;
    }

    public void setThreadsAllowedToBlockForConnectionMultiplier(int threadsAllowedToBlockForConnectionMultiplier) {
        this.threadsAllowedToBlockForConnectionMultiplier = threadsAllowedToBlockForConnectionMultiplier;
    }

    public int getConnectTimeout() {
        return connectTimeout;
    }

    public void setConnectTimeout(int connectTimeout) {
        this.connectTimeout = connectTimeout;
    }

    public int getMaxWaitTime() {
        return maxWaitTime;
    }

    public void setMaxWaitTime(int maxWaitTime) {
        this.maxWaitTime = maxWaitTime;
    }

    public boolean isAutoConnectRetry() {
        return autoConnectRetry;
    }

    public void setAutoConnectRetry(boolean autoConnectRetry) {
        this.autoConnectRetry = autoConnectRetry;
    }

    public boolean isSocketKeepAlive() {
        return socketKeepAlive;
    }

    public void setSocketKeepAlive(boolean socketKeepAlive) {
        this.socketKeepAlive = socketKeepAlive;
    }

    public int getSocketTimeout() {
        return socketTimeout;
    }

    public void setSocketTimeout(int socketTimeout) {
        this.socketTimeout = socketTimeout;
    }

    public boolean isAuth() {
        return isAuth;
    }

    public void setAuth(boolean isAuth) {
        this.isAuth = isAuth;
    }

    public int getConnectionPoolSize() {
        return connectionPoolSize;
    }

    public void setConnectionPoolSize(int connectionPoolSize) {
        this.connectionPoolSize = connectionPoolSize;
    }

    @Override
    public String toString() {
        return "MongoConfig [nodeName=" + nodeName + ", nodeType=" + nodeType + ", host=" + host + ", port=" + port
                + ",userName=" + userName + ", password=" + password + "]";
    }

}
